package com.example.demouser.internal;

import com.example.democommon.domain.InternalUser;
import com.example.democommon.domain.user.User;
import com.example.demouser.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Auther Created by l.wang on 2019/2/27.
 */
@RestController
public class FeignController implements InternalUser {


    @Autowired
    private FeignService feignService;

    @Override
    public String getUser(@RequestParam("id") @NotNull String id) {
        return feignService.getUser(id);
    }

    @Override
    public List<User> getUsers(User user) {
        return feignService.getUsers(user);
    }

    @Override
    public List<User> getUserList(List<User> users) {
        return null;
    }
}
